package gui;

import javax.swing.*;
import javax.swing.event.*;
import java.awt.*;
import java.awt.event.*;

public class patientPage implements ActionListener{
// Initialize all swing objects
private JFrame frame = new JFrame("Patient page"); // Create frame
private JPanel northPnl = new JPanel();
private JPanel eastPnl = new JPanel();
private JPanel westPnl = new JPanel();
private JPanel southPnl = new JPanel();
private JPanel centerPnl = new JPanel();
// Buttons to put in the panels
private JButton appointmentBtn = new JButton("Make an Appointment");
private JButton historyBtn = new JButton("View Medical History");
private JLabel titleLabel = new JLabel("Welcome Patient");

public patientPage(){
	frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	northPnl.add(titleLabel);
	appointmentBtn.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
		//Go to create appointment page
		}
	});
	centerPnl.add(appointmentBtn);
	frame.getContentPane().setLayout(new BorderLayout());
	frame.getContentPane().add(northPnl, BorderLayout.NORTH);
	frame.getContentPane().add(centerPnl, BorderLayout.CENTER);
	centerPnl.add(southPnl);
	historyBtn.addActionListener(new ActionListener() {
		public void actionPerformed(ActionEvent e) {
		//Go to view medical history page
		}
	});
	southPnl.add(historyBtn);
}

@Override
public void actionPerformed(ActionEvent e) {
	// TODO Auto-generated method stub
	
}

// Need to add listeners for the buttons
}
